<template>

<div class="div_page_100" style="width:100%;background-color:#EEEEEE;">
  <div class="div_page_top_middle" style="height:55px;text-align:left;width:1500px;padding-left:6px;">
    <el-row align="middle" style="margin:0;padding:0">
      <el-breadcrumb separator="|" style="margin:0;padding-left:6px">
        <el-breadcrumb-item ><a href="index.html">首页</a></el-breadcrumb-item>
        <el-breadcrumb-item ><a href="customize.html">定制</a></el-breadcrumb-item>
        <el-breadcrumb-item ><a href="overall.html">大事记</a></el-breadcrumb-item>
        <el-breadcrumb-item ><a href="market.html">市场</a></el-breadcrumb-item>
        <el-breadcrumb-item ><a href="stock.html">股票专栏</a></el-breadcrumb-item>
        <!--el-breadcrumb-item :to="{ path: '/customize'}" style="padding:0;margin-top:1px;margin-bottom:1px;">定制</el-breadcrumb-item>
        <el-breadcrumb-item :to="{ path: '/overall'}" style="padding:0;margin-top:1px;margin-bottom:1px;">大事记</el-breadcrumb-item>
        <el-breadcrumb-item :to="{ path: '/market' }" style="padding:0;margin-top:1px;margin-bottom:1px;">市场</el-breadcrumb-item>    
        <el-breadcrumb-item :to="{ path: '/search' }" style="padding:0;margin-top:1px;margin-bottom:1px;">股票专栏</el-breadcrumb-item-->
        <el-breadcrumb-item :to="{ path: '' }"></el-breadcrumb-item>
      </el-breadcrumb>
      </el-row>
  </div>
</div>
<!--div class="div_page_100" style="width:100%;background-color:#ffffff;"-->

<div class="div_page_top_middle" style="width:1000px;padding-top:10px;padding-bottom:10px;margin:0 auto;">
    <div style="text-align:left;float:left;">
      <img src="~@/assets/logo_v2.png" style="width:500px;height:60px;">
    </div>
<div class="div_page_top_middle" style="padding-top:10px;padding-bottom:10px;float:left;width:500px;">
<div class="headerSearch" style="float:left;">
  <input type="search" v-model.trim="entity_name" @keydown.enter="searchEntity">
  <button @click="searchEntity">搜索</button>
</div>
<div class="headerSearch" style="float:left;line-height:40px;padding-left:10px;">
  <a href="suggest.html">自定义实体集</a>
  <!--router-link to="add_suggest">实体集建议</router-link-->
</div>
<!--el-form  :inline="true" ref="formRef" :model="form" label-width="70px">
          <el-form-item label="">
            <el-col :span="24">
            <el-input v-model="form.entity_name"></el-input>
            </el-col>
            <el-col :span="16">
            <p></p>
            </el-col>
          </el-form-item>

          <el-form-item>
            <el-button type="primary" @click="queryEntity">搜索</el-button>
          </el-form-item>
        </el-form>
        <p><router-link :to="{name:'entity_list'}" target="_blank">现有实体集分类</router-link></p>
</div-->
<!--div class="headerSearch" style="float:left;">
    <input id="search_id" placeholder="输入股票代码或名称，如:[600][银行]" type="search" v-model.trim="keyword" v-on:focus="focus()" autocomplete=“off”>
    <button v-bind:disabled="dis">输入并选择</button>
    <div class="search_menu">
      <ul class="input_suggest">
    <li v-for="input_val in input_list" :key="input_val" @click.left="select_li(input_val)">
      {{input_val}}
    </li>
    </ul>
    </div>
</div-->

<div style="clear:both"></div>
</div>
<div style="clear:both"></div>
</div>
<!--/div-->
</template>

<script>
import { reactive,ref } from 'vue'
import { getCurrentInstance } from 'vue'
import { useRouter } from "vue-router";
const router = useRouter();
export default ({
    name: 'ViewHead',
    data () {
      return {
        keyword: '',
        input_list:[]
      };
    },
    setup(){
      const entity_name = '';
      const host = getCurrentInstance()?.appContext.config.globalProperties.host
      return {entity_name, host}
    },
    methods: {
      searchEntity(){
        var router_path = "/search.html?word=" + this.entity_name
        window.open(router_path, '_blank')
        //var router_path = "/entity_search?word=" + this.entity_name
        //this.$router.push(router_path)
      },
    },
    watch:{
    },
})


var mobile_bs = {
 versions: function() {
  var u = navigator.userAgent;
  return {
   trident: u.indexOf('Trident') > -1, //IE内核
   presto: u.indexOf('Presto') > -1, //opera内核
   webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
   gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
   mobile: !! u.match(/AppleWebKit.*Mobile.*/) || !! u.match(/AppleWebKit/) && u.indexOf('QIHU') && u.indexOf('QIHU') > -1 && u.indexOf('Chrome') < 0, //是否为移动终端
   ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
   android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
   iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
   iPad: u.indexOf('iPad') > -1,  //是否iPad
   webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
  }
 } ()
}


var current = window.location.href;
var new_url=current.replace(".html","").replace("http://www.saybydata.com","http://m.saybydata.com/#").replace("http://saybydata.com","http://m.saybydata.com/#")
//alert(new_url);
//window.location.href = new_url;
if (mobile_bs.versions.mobile) {
 if (mobile_bs.versions.android || mobile_bs.versions.iPhone || mobile_bs.versions.ios) {
  window.location.href = new_url;
 }
} 

</script>

<style>


.bottom_line {
    padding: 2px;
    background-color: #409EFF;
}
</style>

<style scoped>
.headerSearch {
    display: inline-block; 
    position: relative;
}
.headerSearch input {
    width: 400px;
    height: 40px;
    font-size:20px;
}

.headerSearch button{
    position: absolute;
    right: 2px;
    top: 2px;
    width: 100px;
    height: 36px;
    margin: 0;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    background-color: #409EFF;
    border-radius: 3px;
}

.search_menu {
  background-color: gold;
  top:40px;
  width:100%;
  height:auto;
  border:1ps solid blue;
  position: absolute;
  text-align: left;
  z-index: 10;
}


input::-webkit-input-placeholder{
    color:#DDDDDD;
    font-size:16px;
}
input::-moz-placeholder{   /* Mozilla Firefox 19+ */
    color:#DDDDDD;
    font-size:16px
}
input:-moz-placeholder{    /* Mozilla Firefox 4 to 18 */
    color:#DDDDDD;
    font-size:16px
}
input:-ms-input-placeholder{  /* Internet Explorer 10-11 */
    color:#DDDDDD;
    font-size:16px
}

</style>